package DataStructure.Set;

import DataStructure.tree.BST.BinarySearchTree;

public class BSTSet<E extends Comparable<E>> implements Set<E>{
    private BinarySearchTree<E> bst = new BinarySearchTree<E>();

    public BSTSet() {
        bst = new BinarySearchTree<>();
    }

    @Override
    public void add(E e) {
        bst.add(e);
    }

    @Override
    public void remove(E e) {
        bst.remove(e);
    }

    @Override
    public boolean contain(E e) {
        return bst.contain(e);
    }

    @Override
    public boolean isEmpty() {
        return bst.isEmpty();
    }

    @Override
    public int getSize() {
        return bst.getSize();
    }
}
